package ua.edu.nuos.tees.jdmmon.threads;

import jssc.SerialPortException;
import ua.edu.nuos.tees.jdmmon.gui.GUI;

import java.io.IOException;
import java.util.TimerTask;

/**
 * @author Timur Yarosh
 *         Date: 02.06.13
 *         Time: 15:35
 */
public class UpdateGuiTask extends TimerTask {
    private GUI gui;
    public UpdateGuiTask(GUI gui) {
        this.gui = gui;
    }
    @Override
    public void run() {
        try {
            gui.refreshGUI();
        } catch (InterruptedException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (SerialPortException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
    }
}
